//所有关于管理员模块的接口
import request from '@/utils/request'
// 添加管理员接口
export const addAdminApi = (data) => {
  return request({
    url: "/VueHandler/AdminLoginAndRegHandler?action=add",
    method: "post",
    data
  })
}
// 获取管理员列表接口
// 列表接口一般都有 分页pageStart 查询字段searchText
export const getAdminListApi = (params) => {
  return request({
    url: "/VueHandler/AdminHandler?action=show",
    method: "get",
    params
  })
}

// 删除管理员接口
export const deleteAdminApi = (tokenId) => {
  return request({
    url: "/VueHandler/AdminHandler?action=delete",
    method: "get",
    params: { tokenId }
  })
}
// 修改管理员接口
export const updateAdminApi = (data) => {
  return request({
    url: "/VueHandler/AdminHandler?action=update",
    method: "post",
    data
  })
}